//## begin module%3B88023E003C.cm preserve=no
//	  %X% %Q% %Z% %W%
//## end module%3B88023E003C.cm

//## begin module%3B88023E003C.cp preserve=no
//	+----------------------------------------------+
//	| SVMBR - A program for training SVMs          |
//	+----------------------------------------------+
//	| * Creator, modeling, coding:                 |
//	|    Marcelo Barros de Almeida                 |
//	|    barros@smar.com.br                        |
//	|    http://litc.cpdee.ufmg.br/~barros/        |
//	| * Coding, improvements, bug fixes:           |
//	|    Bernardo Penna                            |
//	|    bprc@brfree.com.br                        |
//	+----------------------------------------------+
//
//	 Copyright(c) 2002 by Marcelo Barros de Almeida
//	                            All rights reserved
//
//	-[CVS]------------------------------------------
//	$Author$
//	$Date$
//	$Source$
//	$Name$
//	$Revision$
//	------------------------------------------------
//## end module%3B88023E003C.cp

//## Module: global%3B88023E003C; Package specification
//## Subsystem: <Top Level>
//## Source file: D:\textotese\svmbr\src\global.h

#ifndef global_h
#define global_h 1

//## begin module%3B88023E003C.additionalIncludes preserve=no
//## end module%3B88023E003C.additionalIncludes

//## begin module%3B88023E003C.includes preserve=yes

using namespace std;

#ifdef WIN32
#include <strstrea.h>
#else
#include <sstream>
#endif

#include <math.h>
#include <string.h>
#include <fstream>
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <time.h>

#ifndef _MSC_VER
#include <sys/times.h>
#endif

#ifndef _MAX_PATH
#define _MAX_PATH 255
#endif

#ifndef FALSE
#define FALSE 0
#endif

#ifndef TRUE
#define TRUE 1
#endif

#ifndef EMPTY
#define EMPTY -1
#endif

#ifndef CLK_TCK
#define CLK_TCK 100
#endif

#define MIN(x,y) ((x)>(y)?(y):(x))
#define MAX(x,y) ((x)<(y)?(y):(x))
#define ABS(x)	 ((x)>=0?(x):(-(x)))
#define SIGN(x)	 ((x)>=0?1:-1)

#ifdef WIN32
#define RAND(x)  ((INT ) ((      (x))*((REAL)rand())/RAND_MAX))
#define RANDR(x) ((REAL) (((REAL)(x))*((REAL)rand())/(REAL)RAND_MAX)))
#define SRAND(x) srand(x)
#else
#define RAND(x)  ((INT ) (drand48()*(x)))
#define RANDR(x) ((REAL) (drand48()*(x)))
#define SRAND(x) (srand48(x))
#endif

#define SVMBR_DBG
/* estimation for the amount of SV in the set */
#define SUPVEC_PERCENTAGE 0.1 
#define NUM_ITERS_TO_UPDATE_WORKING_SET 20
#define IS_SV(a) (((a)>epsilon)&&((a)<(C-epsilon)))

//## end module%3B88023E003C.includes

//## begin module%3B88023E003C.declarations preserve=no
//## end module%3B88023E003C.declarations

//## begin module%3B88023E003C.additionalDeclarations preserve=yes
//## end module%3B88023E003C.additionalDeclarations


//## begin UINT%3B88020500E4.preface preserve=yes
//## end UINT%3B88020500E4.preface

//## Class: UINT%3B88020500E4
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef unsigned long UINT;

//## begin UINT%3B88020500E4.postscript preserve=yes
//## end UINT%3B88020500E4.postscript

//## begin INT%3B880351031D.preface preserve=yes
//## end INT%3B880351031D.preface

//## Class: INT%3B880351031D
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef long INT;

//## begin INT%3B880351031D.postscript preserve=yes
//## end INT%3B880351031D.postscript

//## begin REAL%3B880359024C.preface preserve=yes
//## end REAL%3B880359024C.preface

//## Class: REAL%3B880359024C
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef double REAL;

//## begin REAL%3B880359024C.postscript preserve=yes
//## end REAL%3B880359024C.postscript

//## begin CHAR%3B88038B0167.preface preserve=yes
//## end CHAR%3B88038B0167.preface

//## Class: CHAR%3B88038B0167
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef char CHAR;

//## begin CHAR%3B88038B0167.postscript preserve=yes
//## end CHAR%3B88038B0167.postscript

//## begin SHORT%3B8803AE0095.preface preserve=yes
//## end SHORT%3B8803AE0095.preface

//## Class: SHORT%3B8803AE0095
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef short SHORT;

//## begin SHORT%3B8803AE0095.postscript preserve=yes
//## end SHORT%3B8803AE0095.postscript

//## begin USHORT%3B8803C30059.preface preserve=yes
//## end USHORT%3B8803C30059.preface

//## Class: USHORT%3B8803C30059
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef unsigned short USHORT;

//## begin USHORT%3B8803C30059.postscript preserve=yes
//## end USHORT%3B8803C30059.postscript

//## begin VOID%3B880A5C009E.preface preserve=yes
//## end VOID%3B880A5C009E.preface

//## Class: VOID%3B880A5C009E
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef void VOID;

//## begin VOID%3B880A5C009E.postscript preserve=yes
//## end VOID%3B880A5C009E.postscript

//## begin UCHAR%3B8B75430239.preface preserve=yes
//## end UCHAR%3B8B75430239.preface

//## Class: UCHAR%3B8B75430239
//## Category: Types package%3B88056B02BC
//## Subsystem: <Top Level>
//## Persistence: Transient
//## Cardinality/Multiplicity: n

typedef unsigned char UCHAR;

//## begin UCHAR%3B8B75430239.postscript preserve=yes
//## end UCHAR%3B8B75430239.postscript

//## begin module%3B88023E003C.epilog preserve=yes
//## end module%3B88023E003C.epilog


#endif
